<div class="pageheader">
    <h2><i class="fa fa-home"></i> 药品信息管理 <span>药品管理</span></h2>
    <div class="breadcrumb-wrapper">
        <span class="label">当前位置:</span>
        <ol class="breadcrumb">
            <li><a href="" ui-sref="index">药品管理</a></li>
            <li class="active">药品信息管理</li>
        </ol>
    </div>
</div>

<div class="contentpanel">
    <form class="form-inline" id="filterForm">
        <div class="col-10" style="margin-bottom:10px;">
            <input type="text" class="form-control" name="searchKey" ng-model="request.params.searchKey"
                   style="width:300px"
                   value="" placeholder="药品名称/药品编码/药品生产厂家">
            <button type="button" class="form-control btn-success" ng-click="search()">查询</button>
            <button type="button" class="form-control btn-primary" ng-click="edit(null)">添加</button>
        </div>
    </form>

    <table class="table table-condensed table-bordered table-striped table-hover table-success">
        <thead>
        <tr>
            <th>药品名称</th>
            <th>生产厂家</th>
            <th>药品规格</th>
            <!--<th>创建时间</th>-->
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="item in request.response.list">
            <td>{{item.name}}</td>
            <td>{{item.producer.name}}</td>
            <td>
                <div class="well well-sm row row-pad-5" style="margin-bottom:5px;" ng-repeat="spec in item.specList track by $index">
                    <div class="col-sm-6">
                        <label class="col-sm-2 control-label">名称</label><span class="label label-primary">{{spec.name}}</span>
                    </div>
                    <div class="col-sm-6">
                        <label class="col-sm-2 control-label">编码</label><span
                            class="label label-default">{{spec.code}}</span>
                    </div>
                    <div class="col-sm-6">
                        <label class="col-sm-2 control-label">进售</label><span
                            class="label label-default" title="进价">{{spec.inPrice}}</span><span class="label label-success" title="售价">{{spec.outPrice}}</span>
                    </div>
                    <div class="col-sm-6">
                        <label class="col-sm-2 control-label">库存</label><span class="label label-info">{{spec.count}}</span>
                    </div>
                </div>
            </td>
            <!--<td>{{item.createDateTime}}</td>-->
            <td>
                <button type="button" class="btn btn-sm btn-warning" ng-click="edit(item.uuid,$index)">修改</button>
                <button type="button" class="btn btn-sm btn-danger" ng-click="delete(item,$index)">删除</button>
            </td>
        </tr>
        </tbody>
    </table>
    <page data="request"></page>
</div>

<div ui-view></div>

